# format比普通的%s这种格式化要灵活, 因为format可以输入不定参数列表
# list转不定参数 --> *listname
import re

valuetext = 'kill -9 {} next {}'
argstext = 'shuoGG,1239,uuu'        # 当args数量大于{}数量时,只匹配前面的几个arg 
arglist = argstext.split(',')
newtext = valuetext.format(*arglist)
print(newtext)

result = re.findall(r'{}', valuetext)
print(len(result))